package link.anyauto.weclass;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.view.View;

import link.anyauto.weclass.base.BaseAct;
import link.anyauto.weclass.databinding.ActDirectoryBinding;

public class Directory extends BaseAct {

    ActDirectoryBinding binding;
    DirectoryVM vm;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        vm = new DirectoryVM();
        vm.setActivity(this);
        super.onCreate(savedInstanceState);
        binding = DataBindingUtil.setContentView(this, R.layout.act_directory);
        binding.setVm(vm);
        binding.fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Snackbar.make(v, "暂无实现", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });
    }

    @Override
    public DirectoryVM getVm() {
        return vm;
    }

    @Override
    public ActDirectoryBinding getBinding() {
        return binding;
    }
}
